Don't include env in windows/macos
authorMarcel Müller <neikos@neikos.email>
Sun, 13 Mar 2016 16:18:09 +0000 (17:18 +0100)
committerMarcel Müller <neikos@neikos.email>
Mon, 14 Mar 2016 02:05:49 +0000 (03:05 +0100)
src/cargo/ops/cargo_doc.rs

index d2f65b827a66b30c93af292684a73b3f9e223bbc..a818ec80e1d22c6eb029b0ff386b4f53656f78d3 100644 (file)
@@ -1,5 +1,4 @@
 use std::collections::HashSet;
-use std::env;
 use std::fs;
 use std::path::Path;
 use std::process::Command;
@@ -73,6 +72,7 @@ pub fn doc(manifest_path: &Path,
 
 #[cfg(not(any(target_os = "windows", target_os = "macos")))]
 fn open_docs(path: &Path) -> Result<&'static str, Vec<&'static str>> {
+    use std::env;
     let mut methods = Vec::new();
     // trying $BROWSER
     match env::var("BROWSER"){